package chapter11;

import java.awt.*;

public class SendMailer {
    Frame frame = new Frame("测试");
    private TextField email = new TextField(40);
    private Button send = new Button("发送");

    public void init() {
        send.addActionListener(new MailerListener(email));
        frame.add(email);
        frame.add(send, BorderLayout.SOUTH);
        frame.pack();
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        new SendMailer().init();
    }
}
